Fix mypy errors by updating to Python 3.10 and excluding open_print_tag files#63
Closed
Copilot wants to merge 6 commits intosupport-openprinttagfrom
Closed
Fix mypy errors by updating to Python 3.10 and excluding open_print_tag files#63Copilot wants to merge 6 commits intosupport-openprinttagfrom
Copilot wants to merge 6 commits intosupport-openprinttagfrom
Conversation
Co-authored-by: bofh69 <1444315+bofh69@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Support OpenPrintTag tags
Fix mypy errors by updating to Python 3.10 and correcting type annotations
Jan 13, 2026
3530688 to
651fd7a
Compare
Owner
|
@copilot change the workflow to not check the files under open_print_tag with mypy, just like the makefile target "typecheck" already do. Don't update any of the files under open_print_tag. rebase this branch on the updated "support-openprinttag" branch. |
…mypy Co-authored-by: bofh69 <1444315+bofh69@users.noreply.github.com>
Contributor
Author
Updated in commit 9a65a6b:
Note: The "support-openprinttag" branch is not available in the repository yet. Once it's pushed, I can rebase this branch onto it. |
Copilot
AI
changed the title
Fix mypy errors by updating to Python 3.10 and correcting type annotations
Fix mypy errors by updating to Python 3.10 and excluding open_print_tag files
Jan 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The mypy configuration specified Python 3.9, but the codebase uses Python 3.10+ pattern matching syntax (
match/case), causing type checking failures.Changes
mypy.ini: Updated
python_versionfrom 3.9 to 3.10 to match CI workflow requirements and added missing import stubs for external libraries (cbor2,numpy,simple_parsing,pn5180_tagomatic,record,common)GitHub Actions workflow: Updated
.github/workflows/mypy.ymlto excludeopen_print_tag/files from type checking, matching the Makefile'stypechecktarget pattern. Only*.pyandlib/*.pyfiles are now checked.Type annotation fixes in lib/ files:
lib/openprinttag_parser.pyandlib/spoolman_client.pyAnytype annotations for dynamic data from tag parsingDict[str, Any]annotation to fix incompatible types# type: ignore[import-not-found]for imports from external OpenPrintTag codeThe external OpenPrintTag files under
open_print_tag/are now excluded from mypy checking as they are third-party code copied from the Prusa OpenPrintTag project.Example fix pattern:
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.